var name = 'Lear'
function test () {
  var name = 'Sue'
  console.log(name)
}
console.log(name) // Lear
test() // Sue